package com.godofgamblers.hotelmanagementsystem.service.imp;

import com.godofgamblers.hotelmanagementsystem.mapper.RoomMapper;
import com.godofgamblers.hotelmanagementsystem.pojo.RoomService;
import com.godofgamblers.hotelmanagementsystem.pojo.RoomType;
import com.godofgamblers.hotelmanagementsystem.pojo.RoomTypePicture;
import com.godofgamblers.hotelmanagementsystem.service.RoomInfoService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Data
@Transactional
public class RoomInfoServiceImp implements RoomInfoService {

    @Autowired
    private RoomMapper roomMapper;

    @Override
    public List<RoomTypePicture> findRoomPicByRtid(int room_type_id) {
        return roomMapper.findRoomPicByRtid(room_type_id);
    }

    @Override
    public RoomType findRoomNameByRtid(int room_type_id) {
        return roomMapper.findRoomNameByRtid(room_type_id);
    }

    @Override
    public List<RoomService> findRoomServiceByRtid(int room_type_id) {
        return roomMapper.findRoomServiceByRtid(room_type_id);
    }
}
